#include<bits/stdc++.h>
using namespace std;
int main() {
    int n;
    cin >> n;
    getchar();
    while (n--) {
        string s;
        getline(cin, s);
        bool p = false, e = false;
        string cur;
        for (int i = 0; i < s.length(); i++) {
            if (s[i] == ',' || s[i] == '.') {
                if (i - 3 >= 0) // 防止越界
                    cur = s.substr(i - 3, 3); // 截取之前 ‘，’之前的三个字符
                if (cur == "ong") {
                    if (s[i] == ',') p = true;
                    else e = true;
                }
                cur = "";
            }
        }
        if (p && e) {
            stringstream sin(s); // 适用流进行读入字符串
            vector<string> a;
            while (sin >> s) a.push_back(s);
            for (int i = 0; i < a.size() - 3; i++) {
                cout << a[i] << " ";
            }
            cout << "qiao ben zhong." << endl;
        }
        else cout << "Skipped" << endl;
    }
    return 0;
}